<?php
include("../include/function.php");
dbconnect();
session_start();
?>
<?php
if($_SESSION["loggedin"]==true && $_SESSION["role"]==admin)
{
if(isset($_SESSION[msg]))
{
echo $_SESSION[msg];
unset($_SESSION[msg]);
}
?>



<?php
/* $select = "SELECT * from client";
$selectquery = mysql_query($select); */
?><table border="1" cellspacing="0">
<tr><td>Client Name</td><td></td>
<td><a href="add.php">ADD</a></td>
</tr>
<?php
//while($row = mysql_fetch_array($selectquery))
$client = selectquery("client");
foreach($client as $key=>$row)

{?>
<tr><td>
<?php
echo $row['clientname'];
?>
</td>
<td><a href="edit.php?id=<?php echo $row[clientid]; ?>">EDIT</a></td>
<td><a href="delete.php?id=<?php echo $row[clientid]; ?>">DELETE</a></td>
</tr>
<?php
}
?>
</table>
<?php
}
else
{
header("Location: login.php");
}
?>